x <- Today() # the same as Sys.Date() but easier to remember..
Year(x)
Quarter(x)
Month(x)
Month(x, format = "abb", lang="engl")
Month(x, format = "abb", lang="local")
Month(x, format = "full", lang="engl")
Month(x, format = "full", lang="local")
Week(x)
Day(x)
Day(x) <- 20
x
Weekday(x)
Weekday(x, format = "abb", lang="engl")
Weekday(x, format = "abb", lang="local")
Weekday(x, format = "full", lang="engl")
Weekday(x, format = "full", lang="local")
YearDay(x)
IsWeekend(x)
IsLeapYear(x)
# let's generate a time sequence by weeks
Month(seq(from=as.Date(Sys.Date()), to=Sys.Date()+150, by="weeks"), format="a")
LastDayOfMonth(as.Date(c("2014-10-12","2013-01-31","2011-12-05")))
Run the code above in your browser using DataLab